package com.erlang.springmvc.controller;

import com.erlang.springmvc.pojo.CustomerListVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Description：list属性参数
 */
@Controller
@RequestMapping(value = "list-type")
public class ListTypeController {

    /**
     * @Description 去操作
     */
    @RequestMapping(value = "to-list-type")
    public ModelAndView toListType(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("list-type");
        return modelAndView;
    }

    /**
     * @Description 操作
     */
    @RequestMapping(value = "do-list-type")
    public ModelAndView doListType(CustomerListVo customerListVo){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("customerListVo", customerListVo.toString());
        modelAndView.setViewName("list-type");
        return modelAndView;
    }

}
